package day3.lesson09

class QingTong
class BaiJing extends QingTong
class Wangzhe extends BaiJing
class Worker
//支持协变
class Card[+T](val name:String)



object Test {
  def wangzhePK(card:Card[QingTong]): Unit ={
    println("欢迎来参加英雄联盟大赛")
  }

  def main(args: Array[String]): Unit = {

    val yunan = new Card[QingTong]("yunan")
    wangzhePK(yunan)
    val zhangjin = new Card[BaiJing]("zhangjin")

    wangzhePK(zhangjin)





  }

}
